<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html>
  <head>
    <title>清分规则管理</title>
    <base href="<%=basePath%>">
    <script src="lib/timePicker/WdatePicker/WdatePicker.js"></script>
  </head>
  
  <body>
  
  	<jsp:include page="common.jsp"></jsp:include>
  	<jsp:include page="alert.jsp"></jsp:include>
  	
  	<div class="secMenu-content">
  		<div class="list-hearBar">
	  		<button type="button" class="btn btn-primary list-headBtn setAll" id="">批量设置</button>
	  		
  			<form class="form-inline list-headRight right" role="form">
				<select class="form-control">
				  <option>--选择网点--</option>
				  <option>全部</option>
				  <option>西斗门</option>
				</select>
				<select class="form-control">
				  <option>--选择产权公司--</option>
				  <option>时空电动</option>
				</select>
				
				<button type="submit" class="btn btn-info">搜索</button>
			</form>
  		</div>
  	
  	 	<table class="table table-hover table-striped table-condensed list-table">
	      <thead>
	        <tr>
	          <th><input type="checkbox" class="checkbox-length list-checkboxAll"></th>
	          <th>换电网点</th>
	          <th>所属产权公司</th>
	          <th>清分比例</th>
	          <th>清分周期</th>
	          <th>起始时期</th>
	          <th>操作</th>
	        </tr>
	      </thead>
	      
	      <tbody>
	        <tr>
	          <th><input type="checkbox" class="list-checkbox"></th>
	          <td>西斗门</td>
	          <td>时空电动</td>
	          <td>60%</td>
	          <td>按周</td>
	          <td>2017-03-06</td>
	          <td class="list-action">
	          	<a href="javascript:;" class="oneSet">更改</a>
	          </td>
	        </tr>
	        
	         <tr>
	          <th><input type="checkbox" class="list-checkbox"></th>
	          <td>西斗门</td>
	          <td>时空电动</td>
	          <td>60%</td>
	          <td>按周</td>
	          <td>2017-03-06</td>
	          <td class="list-action">
	          	<a href="javascript:;" class="oneSet">更改</a>
	          </td>
	        </tr>
	      </tbody>
	    </table>
	    
	    <nav>
		  <ul class="pagination right">
		    <li><a href="javascript:;">首页</a></li>
		    <li class="active"><a href="javascript:;">1</a></li>
		  	<li><a href="javascript:;">2</a></li>
		    <li><a href="javascript:;">3</a></li>
		    <li><a href="javascript:;">4</a></li>
		    <li><a href="javascript:;">5</a></li>
		    <li><a href="javascript:;">尾页</a></li>
		  </ul>
		</nav>
	</div>
	
	<!-- 设置 -->
   <div class="modal fade " id="setModal" data-backdrop="static">
	  <div class="modal-dialog">
	    <div class="modal-content">
	      <div class="modal-header">
	        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
	        <h4 class="modal-title">设置</h4>
	      </div>
	      <div class="modal-body">
	        
			<form class="form-horizontal" role="form">
			  <div class="form-group">
			    <label class="col-sm-4 control-label">清分比例</label>
			    <div class="col-sm-5">
			   		<select class="form-control">
					  <option>请选择比例</option>
					  <option>20%</option>
					  <option>40%</option>
					  <option>60%</option>
					  <option>80%</option>
					  <option>100%</option>
					</select>
				</div>
				 <div class="col-sm-offset-4 col-sm-5 modal-tr-2n">
			   		或自定义<input type="number" class="form-control" style="display: inline-block;width: 68%;">%
				</div>
			  </div>
			  
			  <div class="form-group">
			    <label class="col-sm-4 control-label">清分比例</label>
			    <div class="col-sm-5">
			   		<select class="form-control">
					  <option>请选择周期</option>
					  <option>按周</option>
					  <option>按月</option>
					  <option>按季</option>
					  <option>按年</option>
					</select>
				</div>
			  </div>
			  
			  <div class="form-group">
			    <label class="col-sm-4 control-label">起始日期</label>
			    <div class="col-sm-5">
			   		<input type="text" class="form-control Wdate" onFocus="WdatePicker({lang:'zh-cn'})"/>
				</div>
			  </div>
			  
				<div class="form-group error-bar">
					<div class="col-sm-offset-4 col-sm-5 error-resgister">
						<span id="errorContent_set">错误提示错误提示错误提示</span><!-- 错误提示 -->
					</div>
				</div>
			</form>

	      </div>
	      <div class="modal-footer">
	      	<button type="button" class="btn btn-success modal-btn">保存</button>
	        <button type="button" class="btn btn-default modal-btn" data-dismiss="modal">取消</button>
	      </div>
	    </div><!-- /.modal-content -->
	  </div><!-- /.modal-dialog -->
	</div><!-- /.modal -->
	
	<script type="text/javascript">
		$(document).ready(function(){
			leftMenu.initBlock7_2();//左菜单栏初始化
			batchSet();//批量设置
			oneSet();//单条设置
		});
		
		function batchSet(){
			$(".setAll").on("click",function(){
				if(notChooseTr()==false){
					$("#setModal").modal('show');
				};
			});
		}
		
		function oneSet(){
			$(".oneSet").on("click",function(){
				$("#setModal").modal('show');
			});
		}
	</script>
  </body>
</html>

